package edu.hawaii.duedates.webapp;

import org.apache.wicket.markup.html.WebPage;
import edu.hawaii.duedates.datastore.User;

/**
 * Any subclass of this class is only accessible after logging in.
 * 
 * @author CHANGEME.
 */
public class SecurePage extends WebPage {

  /** Support serialization. */
  private static final long serialVersionUID = 1L;
  
  /**
   * Returns the current session.
   * 
   * @return the current session.
   */
  protected DueDatesSession getCurrentSession() {
    return (DueDatesSession) getSession();
  }
  /**
   * Returns the user for the current session.
   * 
   * @return the user for the current session.
   */
  protected User getUser() {
    return getCurrentSession().getUser();
  }
  
}
